package create.factory;

import create.factory.impl.SenderFactory;

public class FactoryTest {

	public static void main(String[] args) {
		// 普通工厂
		SenderFactory factory = new SenderFactory();
		Sender sender = factory.produce("sms");
		sender.Send();

		// 多工厂方法
		Sender mailSender = factory.produceMail();
		mailSender.Send();

		// 静态工程方法
		Sender mailSender2 = SenderFactory.produceMail2();
		mailSender2.Send();
	}

}
